import http from "../uitls/http.js";

// 获取首页推荐
export const getRecommendAPI = () => {
  return http({
    url: `/novel/recommend`,
    method:'get',
  })
}

// 获取首页分类推荐
export const getCategoryAPI = () => {
  return http({
    url: `/novel/category`,
    method:'get',
  })
}

// 获取首页最近更新和入库小说
export const getNewAPI = () => {
  return http({
    url: `/novel/new`,
    method:'get',
  })
}

// 根据id获取小说简要信息
export const getSimpleAPI = (id) => {
  return http({
    url: `/novel/${id}`,
    method:'get'
  })
}

// 根据id获取小说详细信息, 包括章节信息
export const getDetailAPI = (id) => {
  return http({
    url: `/novel/detail/${id}`,
    method:'get'
  })
}

// 根据类型获取小说简要信息列表 type 小说类型, page当前页, 缓存3页共45篇小说
export const getCategoryListAPI = (type, page) => {
  return http({
    url: `/novel/category/${type}/${page}`,
    method:'get'
  })
}

// 根据小说状态获取小说简要信息列表 type 小说类型, page当前页, 缓存3页共45篇小说
export const getFinishListAPI = (page) => {
  return http({
    url: `/novel/category/finish/${page}`,
    method:'get'
  })
}

// 获取各分类排名
export const getRankingAPI = () => {
  return http({
    url: `/novel/ranking`,
    method:'get'
  })
}


